<html>﻿<!DOCTYPE html>
<html>
<head>
<meta http-equiv="pragma" content="no-cache">  
<meta http-equiv="cache-control" content="no-cache">  
<meta http-equiv="expires" content="0">
<script src="../../../../../../../g.tbcdn.cn/kissy/k/1.3.2/seed.js" tppabs="http://g.tbcdn.cn/kissy/k/1.3.2/seed.js" data-config="{combine:true}"></script>
<style>
ul{margin:0;padding:0;}
ul li{list-style:none;float:left;display:block;width:150px;margin:5px;}
ul li button{width:140px;}
#t1{width:600px;margin:0 auto;}
#J_rst{width:180px;font-size:12px;color:red;}
#J_input{width:300px;}
</style>
</head>
<body>
	<div id="t1">
		选择你要测试的类型：
		<select id="J_input">
			<option selected> </option>
			<option value="{}">EmptyObject -> {}</option>
			<option value="function(){return 1+2;}">Function -> function(){return 1+2;}</option>
			<option value="null">Null</option>
			<option value="123">Number -> 123</option>
			<option value="new Object()">Object -> new Object()</option>
			<option value=" { x:1, y:2, radius:2 }">PlainObject ->  { x:1, y:2, radius:2 }</option>
			<option value="/^[0-9]+/g">RegExp -> /^[0-9]+/g</option>
			<option value="new String('abc')">String -> new String('abc')</option>
			<option value="">Undefined</option>
			<option value="[1,2,3]">Array -> [1,2,3]</option>
			<option value="true">Boolean -> true</option>
			<option value="new Date()">Date -> new Date()</option>
		</select>
		<ul>
			<li><button>isEmptyObject</button></li>
			<li><button>isFunction</button></li>
			<li><button>isNull</button></li>
			<li><button>isNumber</button></li>
			<li><button>isObject</button></li>
			<li><button>isPlainObject</button></li>
			<li><button>isRegExp</button></li>
			<li><button>isString</button></li>
			<li><button>isUndefined</button></li>
			<li><button>isArray</button></li>
			<li><button>isBoolean</button></li>
			<li><button>isDate</button></li>
		</ul>
		<div id="J_rst"></div>
	</div>
<script>
    KISSY.use('dom,event',function (S,DOM,Event) {
	Event.on('button','click',function(e){
		var v = DOM.val("#J_input");
		var fc = 'KISSY.'+DOM.text(this)+'('+v+');';
		var result = DOM.text(this)+' => '+eval(fc);
		DOM.text('#J_rst',result);
	});
});
</script>
</body>
</html>
